package com.dehui.traders.ui.viewmodle;

import android.content.Context;
import android.databinding.ObservableArrayList;
import android.databinding.ObservableList;

import com.dehui.traders.BR;
import com.dehui.traders.R;
import com.dehui.traders.bean.StrategyBean;

import me.goldze.mvvmhabit.base.BaseViewModel;
import me.tatarka.bindingcollectionadapter2.ItemBinding;

/**
 * Created by hqq on 18.3.30.
 */

public class SmartChooseStocksViewModel extends BaseViewModel{

    public ObservableList<StrateItemViewModel> strateObservableList = new ObservableArrayList<>();

    public ItemBinding<StrateItemViewModel> strateItemBinding = ItemBinding.of(BR.viewModel, R.layout.list_item_strate);

    public SmartChooseStocksViewModel(Context context) {
        super(context);
    }

    @Override
    public void onCreate() {
        super.onCreate();
        initSimulatedData();
    }

    private void initSimulatedData() {
        strateObservableList.add(new StrateItemViewModel(context,new StrategyBean("策略一")));
        strateObservableList.add(new StrateItemViewModel(context,new StrategyBean("策略二")));
        strateObservableList.add(new StrateItemViewModel(context,new StrategyBean("策略三")));
        strateObservableList.add(new StrateItemViewModel(context,new StrategyBean("策略四")));
        strateObservableList.add(new StrateItemViewModel(context,new StrategyBean("策略五")));
        strateObservableList.add(new StrateItemViewModel(context,new StrategyBean("策略六")));
    }
}
